﻿namespace WpfApplication6.ViewModel
{
    [ShellCommand]
    public class TwoCommandViewModel : CommandViewModel
    {
        private readonly IShell _shell;

        public TwoCommandViewModel(IShell shell)
        {
            _shell = shell;
            DisplayText = "cmd2";
        }

        protected override void Execute()
        {
            _shell.MainPanel = new ViewModel {DisplayText = "two"};
        }

        protected override bool CanExecute()
        {
            return true;
        }
    }
}